<%@page import="com.xnx3.j2ee.Global"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>  
<%@ taglib uri="http://www.xnx3.com/java_xnx3/xnx3_tld" prefix="x" %>
<jsp:include page="/store/common/head.jsp">
	<jsp:param name="name" value="订单列表"/>
</jsp:include>
<script src="/<%=Global.CACHE_FILE %>Order_state.js"></script>
<style>
.product-buyer-name {
	max-width: 110px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
</style>
<div style="height:10px;"></div>
<jsp:include page="/wm/common/list/formSearch_formStart.jsp" ></jsp:include>
	<jsp:include page="/wm/common/list/formSearch_input.jsp">
		<jsp:param name="iw_label" value="骑手姓名" />
		<jsp:param name="iw_name" value="qishou_name" />
	</jsp:include>
	<div hidden>
	<jsp:include  page="/wm/common/list/formSearch_input.jsp" >
		<jsp:param name="iw_label" value="用户编号" />
		<jsp:param name="iw_name" value="userid" />
	</jsp:include>
	</div>
	<a class="layui-btn" href="javascript:wm.list(1);" style="margin-left: 15px;">搜索</a>
</form>

<table class="aui-table-responsive layui-table iw_table" style="min-width: 1600px;">
	<thead>
		<tr>
			<th width="100px" style= "text-align:center">订单号</th>
			<th width="150" style= "text-align:center">出售人姓名</th>
			<th width="150px" style= "text-align:center">出售人手机号</th>
			<th width="100px" style= "text-align:center">骑手姓名</th>
			<th width="100px" style= "text-align:center">骑手电话</th>
			<th width="100px" style= "text-align:center">服务状态</th>
			<th width="100px" style= "text-align:center">预计金额(元)</th>
			<th width="100px" style= "text-align:center">实付金额(元)</th>
			<th width="100px" style= "text-align:center">总重量(kg)</th>
			<th width="100px" style= "text-align:center">备注</th>
			<th width="150px" style= "text-align:center">取件信息</th>
		</tr> 
	</thead>
	<tbody>
		<tr v-for="item in list">
			<td>{{item.no}}</td>
			<td>{{item.username}}</td>
			<td>{{item.phone}}</td>
			<td>{{item.qishouName}}</td>
			<td>{{item.qishouPhone}}</td>
			<td>{{state[item.state]}}</td>
			<td>{{item.totalMoney/100}}</td>
			<td>{{item.payMoney/100}}</td>
			<td>{{item.allWeight/1000}}</td>
			<td class="product-buyer-name">{{item.remark}}</td>
			<td style="width: 250px;">
				<botton class="layui-btn layui-btn-sm" :onclick="'orderDetails('+item.id+', \''+item.no+'\');'" style="margin-left: 3px;">订单详情</botton>
				<botton class="layui-btn layui-btn-sm" :onclick="'orderGoodsDetails('+item.id+', \''+item.no+'\');'" style="margin-left: 3px;">商品详情</botton>
				<botton v-if="item.state == 5" class="layui-btn layui-btn-sm" :onclick="'orderEvaluate('+item.id+', \''+item.no+'\');'" style="margin-left: 3px;">查看评价</botton>
			</td>
		</tr>
	</tbody>
</table>
<!-- 通用分页跳转 -->
<jsp:include page="/wm/common/page.jsp" />

<script type="text/javascript">
//自适应弹出层大小
var index = parent.layer.getFrameIndex(window.name); //获取窗口索引

//查看取件信息
function orderDetails(id,no){
	 layer.open({
		type: 2,
		title:'查看取件信息',
		area: ['500px', '650px'],
		shadeClose: true, //开启遮罩关闭
		content: '/superadmin/order/orderDetails.jsp?id=' + id
	});
}
//查看订单商品信息
function orderGoodsDetails(id,no){
	 layer.open({
		type: 2,
		title:'查看订单号['+no+']商品信息',
		area: ['50%', '80%'],
		shadeClose: true, //开启遮罩关闭
		content: '/superadmin/order/orderGoodsDetails.jsp?id=' + id
	});
}
//查看评价信息
function orderEvaluate(id,no){
	 layer.open({
		type: 2,
		title:'查看评价信息',
		area: ['500px', '480px'],
		shadeClose: true, //开启遮罩关闭
		content: '/agency/order/orderEvaluationDetails.jsp?id=' + id
	});
}

//刚进入这个页面，加载第一页的数据
wm.list(1,'/admin/user/orderList.json');
</script>
<jsp:include page="/wm/common/foot.jsp"></jsp:include>